package game;

import aurelienribon.bodyeditor.BodyEditorLoader;

import com.badlogic.gdx.files.FileHandle;
import com.badlogic.gdx.physics.box2d.Body;
import com.badlogic.gdx.physics.box2d.BodyDef;
import com.badlogic.gdx.physics.box2d.FixtureDef;

public class EntitySection {

	Body body;
	FileHandle toLoad;

	public EntitySection(FileHandle toLoad) {
		this.toLoad = toLoad;
	}

	public void createFixture(GameWorld world) {
		BodyEditorLoader loader = new BodyEditorLoader(toLoad);

		BodyDef bd = new BodyDef();
		bd.position.set(100, 100);

		FixtureDef fd = new FixtureDef();
		fd.density = 2;
		fd.restitution = 0;
		
		body = world.world.createBody(bd);
		loader.attachFixture(body, toLoad.name(), fd, 1, 100, 100);
	}

}
